package com.gibs.peixunapi.model;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Entity
@Data
//@Table(name = "lesson")
public class Course extends BaseModel {	//课程

	private String name;     //课程名称


	private String summary;     //简介

	private Integer creator;     //创建者

	private Integer hours;     //课程总时长

	private Date startTime;     //开始时间

	private Date endTime;     //结束时间

	private Date invalidTime;     //截止时间

	private String type;     //课程类别

	//TODO course_teacher分离出来
	@OneToOne(cascade = CascadeType.REFRESH)
	private User teacher;     //负责(主教老师)
	//TODO course_teacher分离出来
	@ManyToOne(cascade = CascadeType.REFRESH)
	private User assitTeachers;     //助教老师

	private Integer fileCount;     //文档培训数量

	private Integer videoCount;     //视频培训数量

	private boolean isDelete;     //是否删除

	@OrderBy
	private Integer sort;     //排序


}

